package br.unisinos.aidk.puzzle;

import java.util.Comparator;

public class EightBoardComparator implements Comparator<EightBoard> {

	@Override
	public int compare(EightBoard a1, EightBoard a2) {
		float v1 = EightBoardProblem.evaluate(a1);
		float v2 = EightBoardProblem.evaluate(a2);
		if(v1<v2) return -1;
		else if(v1==v2) return 0;
		else return 1;
	}
}
